﻿<navigation:Page xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="GranitePackageSystem.Views.Deployment.DeploymentApprovalView" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
           xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
           d:DesignWidth="1024" d:DesignHeight="2048" MaxWidth="1024"
           Title="DeploymentApprovalView Page">
    <Grid x:Name="LayoutRoot">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="10" />
        <RowDefinition Height="333*" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="250" />
        <ColumnDefinition Width="550*" />
    </Grid.ColumnDefinitions>
    <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="10" Name="panelTitle">
        <TextBlock Text="Deployment Approval View" FontSize="18" FontWeight="Bold" HorizontalAlignment="Center" />
    </StackPanel>
    <StackPanel Grid.Row="1" Name="panelLandingNav" Margin="10,10,10,0" Background="#FF484848" Height="Auto" VerticalAlignment="Top" Width="200" HorizontalAlignment="Center">
        <StackPanel>
            <HyperlinkButton x:Name="linkHome" NavigateUri="/Home" TargetName="ContentFrame" Content="Dashboard" Style="{StaticResource LinkStyle}" Background="{x:Null}" AllowDrop="True" HorizontalContentAlignment="Left" Margin="16,0,0,0"/>
            <controlsToolkit:Expander ExpandDirection="Down" IsExpanded="True">
                <controlsToolkit:Expander.Header>
                    <TextBlock Text="Current Request" FontSize="12" Foreground="White" TextAlignment="Left" />
                </controlsToolkit:Expander.Header>
                <controlsToolkit:Expander.Content>
                    <StackPanel HorizontalAlignment="Right" Margin="30,0,0,0" Width="AUTO">
                            <HyperlinkButton x:Name="linkDeploymentPlan" NavigateUri="/Request/SourceFiles" TargetName="ContentFrame" Content="• Deployment Plan" Margin="0,0,5,0" Style="{StaticResource LinkStyle}" HorizontalContentAlignment="Left" Foreground="#FF42A1F5" />
                    </StackPanel>
                </controlsToolkit:Expander.Content>
            </controlsToolkit:Expander>
        </StackPanel>
    </StackPanel>
        <controlsToolkit:BusyIndicator Name="busyIndicatorMain" Grid.Column="1" Grid.Row="1">
            <StackPanel Name="panelContent">
                <controlsToolkit:BusyIndicator Name="busyIndicatorPackageInformation" Grid.Column="1" Grid.Row="1">
                    <StackPanel Name="panelPackageInfo" Orientation="Horizontal">
                        <StackPanel Width="150">
                            <TextBlock Text="Package Name" Margin="5" Height="23" />
                            <TextBlock Text="Package Version" Margin="5" Height="23"  />
                            <TextBlock Text="Package Size (MB)" Margin="5" Height="23" />
                        </StackPanel>
                        <StackPanel>
                            <TextBox Name="boxPackageName" Margin="5" Height="23" Width="300" />
                            <TextBox Name="boxPackageVersion" Margin="5" Height="23" Width="300" />
                            <TextBox Name="boxPackageSize" Margin="5" Height="23" Width="300" />
                        </StackPanel>
                        <StackPanel Width="310">
                            <Button Name="btnDeployToDPs" Content="Deploy to Selected Distribution Points" Width="220" Margin="5" Height="23" Click="btnDeployToDPs_Click" />
                            <Button Name="btnCreateAdvertisement" Content="Add Usergroup To Collection" Width="220" Margin="5" Height="23" IsEnabled="False" Click="btnCreateAdvertisement_Click"/>
                        </StackPanel>
                    </StackPanel>
                </controlsToolkit:BusyIndicator>
                <TextBlock Text="Work Log" Margin="5,20,0,0" FontWeight="Bold" />
                <sdk:DataGrid Name="gridWorkLog" Height="120" HorizontalAlignment="Left" Margin="5" AutoGenerateColumns="False" MouseLeftButtonUp="gridWorkLog_MouseLeftButtonUp">
                    <sdk:DataGrid.Columns>
                        <sdk:DataGridTextColumn Binding="{Binding UserName}" Header="User Name" IsReadOnly="True" Width="1*" />
                        <sdk:DataGridTextColumn Binding="{Binding NoteDate}" Header="Date" IsReadOnly="True" Width="1*" />
                        <sdk:DataGridTextColumn Binding="{Binding displayLine}" Header="Note" IsReadOnly="True" Width="2*" />
                    </sdk:DataGrid.Columns>
                </sdk:DataGrid>
                <Button Name="btnAddWorklogEntry" Content="Add Worklog Entry" HorizontalAlignment="Right" Margin="5" Width="130" Click="btnAddWorklogEntry_Click" />
                <controlsToolkit:BusyIndicator Name="busyIndicatorDestinationSites">
                    <StackPanel Name="panelDestinationSites" Margin="5">
                        <sdk:DataGrid Name="gridDestinationSites" AutoGenerateColumns="False" GotFocus="gridDestinationSites_GotFocus">
                            <sdk:DataGrid.Columns>
                                <sdk:DataGridTextColumn Binding="{Binding ADSite}" Header="AD Site" IsReadOnly="True" Width="1*" />
                                <sdk:DataGridTextColumn Binding="{Binding NumberOfUsers}" Header="Number of Users" IsReadOnly="True" Width="1*" />
                            </sdk:DataGrid.Columns>
                        </sdk:DataGrid>
                    </StackPanel>
                </controlsToolkit:BusyIndicator>
                <controlsToolkit:BusyIndicator Name="busyIndicatorDPs">
                    <StackPanel Name="panelDistributionSites" Margin="5">
                        <sdk:DataGrid Name="gridSuggestedDPs" AutoGenerateColumns="False" MaxHeight="300">
                            <sdk:DataGrid.Columns>
                                <sdk:DataGridTextColumn Binding="{Binding ServerName}" Header="DP Name" IsReadOnly="True" Width="2*" />
                                <sdk:DataGridTextColumn Binding="{Binding SiteCode}" Header="Site Code" IsReadOnly="True" Width="1*" />
                                <sdk:DataGridTextColumn Binding="{Binding SiteName}" Header="Site Name" IsReadOnly="True" Width="1*" />
                                <sdk:DataGridTemplateColumn>
                                    <sdk:DataGridTemplateColumn.CellEditingTemplate>
                                        <DataTemplate>
                                            <CheckBox IsThreeState="False" IsChecked="{Binding selected, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                        </DataTemplate>
                                    </sdk:DataGridTemplateColumn.CellEditingTemplate>
                                </sdk:DataGridTemplateColumn>
                            </sdk:DataGrid.Columns>
                        </sdk:DataGrid>
                        <Button Name="btnRemoveDPsFromDestinationDPs" HorizontalAlignment="Right" Margin="5" Content="Remove Selected DPs" Click="btnRemoveDPsFromDestinationDPs_Click" />
                        <sdk:DataGrid Name="gridAllDPs" AutoGenerateColumns="False" MaxHeight="300">
                            <sdk:DataGrid.Columns>
                                <sdk:DataGridTextColumn Binding="{Binding ServerName}" Header="DP Name" IsReadOnly="True" Width="2*" />
                                <sdk:DataGridTextColumn Binding="{Binding SiteCode}" Header="Site Code" IsReadOnly="True" Width="1*" />
                                <sdk:DataGridTextColumn Binding="{Binding SiteName}" Header="Site Name" IsReadOnly="True" Width="1*" />
                                <sdk:DataGridTemplateColumn>
                                    <sdk:DataGridTemplateColumn.CellEditingTemplate>
                                        <DataTemplate>
                                            <CheckBox IsThreeState="False" IsChecked="{Binding selected, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                        </DataTemplate>
                                    </sdk:DataGridTemplateColumn.CellEditingTemplate>
                                </sdk:DataGridTemplateColumn>
                            </sdk:DataGrid.Columns>
                        </sdk:DataGrid>
                        <Button Name="btnAddDPsToDestinationDPs" HorizontalAlignment="Right" Margin="5" Content="Add Selected DPs" Click="btnAddDPsToDestinationDPs_Click"/>
                    </StackPanel>
                </controlsToolkit:BusyIndicator>
            </StackPanel>
        </controlsToolkit:BusyIndicator>
    </Grid>
</navigation:Page>
